/*
 *  testMultiTables.cpp
 *  kangmodb
 *
 *  Created by 강모 김 on 11. 4. 11..
 *  Copyright 2011 강모소프트. All rights reserved.
 *
 */

#include "gtest/gtest.h"

#include "kangmodb.h"
#include "testCommon.h"

/** @brief Test running IUDS on multiple tables by single transaction.
 */
class MultiTableTest : public testing::Test {
protected:  // You should make the members protected s.t. they can be
	// accessed from sub-classes.
	
	// virtual void SetUp() will be called before each test is run.  You
	// should define it if you need to initialize the varaibles.
	// Otherwise, this can be skipped.
	virtual void SetUp() {
		ASSERT_TRUE( setup_cursor( &db_, &tx_, &tableId_, &cursor_ ) == 0 );
	}
	
	// virtual void TearDown() will be called after each test is run.
	// You should define it if there is cleanup work to do.  Otherwise,
	// you don't have to provide it.
	//
	virtual void TearDown() {
		// close table succeeds
		ASSERT_TRUE( teardown_cursor( &db_, &tx_, &tableId_, &cursor_ ) == 0 );
	}
protected:
	stgKangmoDB * db_;
	stgTransaction * tx_;
	stgTableId tableId_;
	stgTableCursor * cursor_;
};

// TODO : test if xxxTable functions fail if database is closed.

TEST_F(MultiTableTest, DISABLED_BasicMultiTables) {
}

